package com.luntan.school.model;

import com.luntan.school.service.Posts;

import java.util.Date;
import java.util.List;

public class Comment {
    /**
     * 编号
     */
    private Long id;
    /**
     * 内容
     */
    private String content;

    /**
     * 发表时间
     */
    private Date pubdate;

    /**
     * 是否隐藏
     */
    private Boolean hidden;

    /**
     * 点赞数
     */
    private Integer likeCount;

    /**
     * 点踩数
     */
    private Integer dislikeCount;

    /**
     * 临时储存回复本条记录的ID（本字段不存库，用于叛逆查询）
     */
    private Long replyId;

    /**
     * 回复（评论）
     */
    private Comment replyFor;

    /**
     * (针对本评论)回复列表
     */
    private List<Comment> replies;

    /**
     * 评论人
     */
    private User creator;

    /**
     * (被评论的)新闻
     */
    private Posts posts;


    public Comment() {
    }

    public Comment(Long id, String content, Date pubdate, Boolean hidden, Integer likeCount, Integer dislikeCount, Long replyId, Comment replyFor, List<Comment> replies, User creator, Posts posts) {
        this.id = id;
        this.content = content;
        this.pubdate = pubdate;
        this.hidden = hidden;
        this.likeCount = likeCount;
        this.dislikeCount = dislikeCount;
        this.replyId = replyId;
        this.replyFor = replyFor;
        this.replies = replies;
        this.creator = creator;
        this.posts = posts;
    }

    /**
     * 获取
     * @return id
     */
    public Long getId() {
        return id;
    }

    /**
     * 设置
     * @param id
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 获取
     * @return content
     */
    public String getContent() {
        return content;
    }

    /**
     * 设置
     * @param content
     */
    public void setContent(String content) {
        this.content = content;
    }

    /**
     * 获取
     * @return pubdate
     */
    public Date getPubdate() {
        return pubdate;
    }

    /**
     * 设置
     * @param pubdate
     */
    public void setPubdate(Date pubdate) {
        this.pubdate = pubdate;
    }

    /**
     * 获取
     * @return hidden
     */
    public Boolean getHidden() {
        return hidden;
    }

    /**
     * 设置
     * @param hidden
     */
    public void setHidden(Boolean hidden) {
        this.hidden = hidden;
    }

    /**
     * 获取
     * @return likeCount
     */
    public Integer getLikeCount() {
        return likeCount;
    }

    /**
     * 设置
     * @param likeCount
     */
    public void setLikeCount(Integer likeCount) {
        this.likeCount = likeCount;
    }

    /**
     * 获取
     * @return dislikeCount
     */
    public Integer getDislikeCount() {
        return dislikeCount;
    }

    /**
     * 设置
     * @param dislikeCount
     */
    public void setDislikeCount(Integer dislikeCount) {
        this.dislikeCount = dislikeCount;
    }

    /**
     * 获取
     * @return replyId
     */
    public Long getReplyId() {
        return replyId;
    }

    /**
     * 设置
     * @param replyId
     */
    public void setReplyId(Long replyId) {
        this.replyId = replyId;
    }

    /**
     * 获取
     * @return replyFor
     */
    public Comment getReplyFor() {
        return replyFor;
    }

    /**
     * 设置
     * @param replyFor
     */
    public void setReplyFor(Comment replyFor) {
        this.replyFor = replyFor;
    }

    /**
     * 获取
     * @return replies
     */
    public List<Comment> getReplies() {
        return replies;
    }

    /**
     * 设置
     * @param replies
     */
    public void setReplies(List<Comment> replies) {
        this.replies = replies;
    }

    /**
     * 获取
     * @return creator
     */
    public User getCreator() {
        return creator;
    }

    /**
     * 设置
     * @param creator
     */
    public void setCreator(User creator) {
        this.creator = creator;
    }

    /**
     * 获取
     * @return posts
     */
    public Posts getPosts() {
        return posts;
    }

    /**
     * 设置
     * @param posts
     */
    public void setPosts(Posts posts) {
        this.posts = posts;
    }

    public String toString() {
        return "Comment{id = " + id + ", content = " + content + ", pubdate = " + pubdate + ", hidden = " + hidden + ", likeCount = " + likeCount + ", dislikeCount = " + dislikeCount + ", replyId = " + replyId + ", replyFor = " + replyFor + ", replies = " + replies + ", creator = " + creator + ", posts = " + posts + "}";
    }
}
